<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Home extends CI_Controller {

    public function __construct() {
        parent::__construct();
        session_start();
        $this->load->library('template');
        $this->load->helper('url');
        $this->load->helper('user_helper');
        $this->template->set_template('default');
        
        $this->template->add_css('public/css/bootstrap.css');
        $this->template->add_css('public/css/bootstrap-responsive.css');
      

//        $this->template->add_js('public/js/jquery-1.9.1.js');
        $this->template->add_js('public/js/jquery-1.11.0.min.js');
//        $this->template->add_js('public/js/jquery.min.js');
        $this->template->add_js('public/js/bootstrap.min.js');
        $data["newUrl"] = base_url() . "index.php/event/";
        $data["createEventUrl"] = base_url() . "index.php/event/create";
        $data["loginUrl"] = base_url() . "index.php/user/";
        $data["chatUrl"] = base_url() . "index.php/chat/";
        $data["registerUrl"] = base_url() . "index.php/user/register";
        $this->template->write_view('header', 'top_menu', $data, TRUE);
    }

    public function index() {

        //Load content, not load file
        $this->template->write('title', 'Trang chủ');
        $this->template->add_js('public/js/counter.js');
        $this->template->write_view('content', 'home');
//        $this->template->write_view('content', 'test');
        $this->template->load();
    }
    public function t() {

        //Load content, not load file
        $this->template->write('title', 'Trang chủ');
        $this->template->add_js('public/js/counter.js');
//        $this->template->write_view('content', 'home');
        $this->template->write_view('content', 'test');
        $this->template->load();
    }

}

